﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="MediaPlayer.PlayerControls"
	x:Name="UserControl"
	d:DesignWidth="640" Height="73">
    <UserControl.Resources>
        <Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="0.265"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Ellipse Stroke="Black">
                                <Ellipse.Fill>
                                    <ImageBrush ImageSource="pack://siteoforigin:,,,/play.png" Stretch="Uniform"/>
                                </Ellipse.Fill>
                            </Ellipse>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PlayButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Ellipse x:Name="ellipse" Opacity="0.595" Stroke="Black">
                                <Ellipse.Fill>
                                    <ImageBrush ImageSource="pack://siteoforigin:,,,/play.png" Stretch="Uniform"/>
                                </Ellipse.Fill>
                            </Ellipse>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content=""/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="RewindButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Ellipse x:Name="ellipse" Stroke="Black" Opacity="0.595">
                                <Ellipse.Fill>
                                    <ImageBrush ImageSource="pack://siteoforigin:,,,/rewind.png" Stretch="Uniform"/>
                                </Ellipse.Fill>
                            </Ellipse>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content=""/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="StopButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Ellipse x:Name="ellipse" Stroke="Black" Opacity="0.6">
                                <Ellipse.Fill>
                                    <ImageBrush ImageSource="pack://siteoforigin:,,,/stop.png" Stretch="Uniform"/>
                                </Ellipse.Fill>
                            </Ellipse>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content=""/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="OpenFileButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Ellipse x:Name="ellipse" Stroke="Black" Opacity="0.595">
                                <Ellipse.Fill>
                                    <ImageBrush ImageSource="pack://siteoforigin:,,,/openFile.png" Stretch="Uniform"/>
                                </Ellipse.Fill>
                            </Ellipse>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content=""/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PauseButtonStyle" TargetType="{x:Type Button}">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="{x:Type Button}">
        				<Grid>
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="MouseOver">
        								<Storyboard>
        									<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
        										<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
        									</DoubleAnimationUsingKeyFrames>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Pressed"/>
        							<VisualState x:Name="Disabled"/>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Ellipse x:Name="ellipse" Stroke="Black" Opacity="0.595">
        						<Ellipse.Fill>
        							<ImageBrush ImageSource="pack://siteoforigin:,,,/pause.png" Stretch="Uniform"/>
        						</Ellipse.Fill>
        					</Ellipse>
        					<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content=""/>
        				</Grid>
        				<ControlTemplate.Triggers>
        					<Trigger Property="IsFocused" Value="True"/>
        					<Trigger Property="IsDefaulted" Value="True"/>
        					<Trigger Property="IsMouseOver" Value="True"/>
        					<Trigger Property="IsPressed" Value="True"/>
        					<Trigger Property="IsEnabled" Value="False"/>
        				</ControlTemplate.Triggers>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
        <Style x:Key="FullScreenButtonStyle" TargetType="{x:Type Button}">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="{x:Type Button}">
        				<Grid>
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="MouseOver">
        								<Storyboard>
        									<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
        										<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
        									</DoubleAnimationUsingKeyFrames>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Pressed"/>
        							<VisualState x:Name="Disabled"/>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Ellipse x:Name="ellipse" Stroke="Black" Opacity="0.595">
        						<Ellipse.Fill>
        							<ImageBrush ImageSource="fullScreen.png" Stretch="Uniform"/>
        						</Ellipse.Fill>
        					</Ellipse>
        					<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content=""/>
        				</Grid>
        				<ControlTemplate.Triggers>
        					<Trigger Property="IsFocused" Value="True"/>
        					<Trigger Property="IsDefaulted" Value="True"/>
        					<Trigger Property="IsMouseOver" Value="True"/>
        					<Trigger Property="IsPressed" Value="True"/>
        					<Trigger Property="IsEnabled" Value="False"/>
        				</ControlTemplate.Triggers>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" RenderTransformOrigin="0.495,0.288">
        <Border BorderBrush="Black" BorderThickness="1" Height="58" Margin="8,8,8,0" VerticalAlignment="Top" CornerRadius="70,70,70,70">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="#FF65C3FF" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Button x:Name="playButton" Content="Button" Height="56" Margin="292,10,293,0" Style="{DynamicResource PlayButtonStyle}" VerticalAlignment="Top" BorderThickness="0" HorizontalAlignment="Center" Width="56" Click="playButton_Click" ToolTip="Play"/>
        <Button x:Name="fastForwardButton" Content="Button" HorizontalAlignment="Center" Height="40" Margin="215,18,0,0" Style="{DynamicResource RewindButtonStyle}" VerticalAlignment="Top" Width="40" BorderThickness="0" RenderTransformOrigin="0.5,0.5" Click="fastForwardButton_Click" ToolTip="Fast forward">
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="180.594"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>
        <Button x:Name="rewindButton" Content="Button" HorizontalAlignment="Center" Height="40" Margin="0,19,222.25,0" Style="{DynamicResource RewindButtonStyle}" VerticalAlignment="Top" Width="40" BorderThickness="0" RenderTransformOrigin="0.5,0.5" Click="rewindButton_Click" ToolTip="Rewind">
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="-0.402"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>
        <Button x:Name="stopButton" Content="Button" HorizontalAlignment="Left" Height="29" Margin="126.375,24,0,0" Style="{DynamicResource StopButtonStyle}" VerticalAlignment="Top" Width="29" BorderThickness="0" Click="stopButton_Click" ToolTip="Stop"/>
        <Button x:Name="openFileButton" Content="Button" HorizontalAlignment="Left" Height="29" Margin="67,24,0,0" Style="{DynamicResource OpenFileButtonStyle}" VerticalAlignment="Top" Width="29" Click="openFileButton_Click" ToolTip="Open file"/>
        <Button x:Name="pauseButton" Content="Button" Margin="291.5,10,292.5,7" Style="{DynamicResource PauseButtonStyle}" HorizontalAlignment="Center" Width="56" Height="56" Click="pauseButton_Click" Visibility="Hidden" ToolTip="Pause"/>
        <Button x:Name="fullScreenButton" Content="Button" HorizontalAlignment="Right" Margin="0,24,126,20" Style="{DynamicResource FullScreenButtonStyle}" Width="29" Click="fullScreenButton_Click" ToolTip="Full screen"/>
        <Button x:Name="openStreamButton" Content="Button" HorizontalAlignment="Right" Height="29" Margin="0,24,67,0" Style="{DynamicResource OpenFileButtonStyle}" VerticalAlignment="Top" Width="29" Click="openStreamButton_Click" ToolTip="Open Stream"/>

    </Grid>
</UserControl>